<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path;
%>

<div class="page-content">
    <div class="row">
        <div class="col-xs-12">
            <table class="width-p-100">
                <tr>
                    <td colspan="2">
                        <h1 class="m-0 p-0 c-red f-s-16 text-break align-center line-height-p-180">
                            ${resultVo.result.learnName}
                        </h1>
                    </td>
                </tr>

                <tr class="border-bottom-red">
                    <td class="c-tint-black p-t-10 p-l-10 f-s-12 text-break align-left width-p-50">
                        创建人：${resultVo.result.loginUser.loginName}
                    </td>

                    <td class="c-tint-black p-t-10 p-r-10 f-s-12 text-break align-right width-p-50">
                        时间：${resultVo.result.learnCreateTime}
                    </td>
                </tr>

                <tr>
                    <td colspan="2" class="p-t-5 p-l-10 p-r-10">
                        <p class="m-0 p-0 f-s-14 text-break align-justify text-indent-30 line-height-p-180">
                            ${resultVo.result.learnContent}
                        </p>
                    </td>
                </tr>

                <c:if test="${not empty resultVo.result.learnFiles}">
                    <c:set var="learnFiles" value="${fn:split(resultVo.result.learnFiles, '|')}"/>
                    <c:set var="learnFilesName" value="${fn:split(resultVo.result.learnFilesName, '|')}"/>

                    <tr>
                        <td colspan="2" class="c-red p-t-50 p-l-10 p-r-10 f-s-14 text-break">
                            资料附件：
                        </td>
                    </tr>

                    <c:forEach var="learnFile" varStatus="status" items="${learnFiles}">
                        <tr>
                            <td colspan="2" class="p-t-5 p-l-10 p-r-10 text-break">
                                <a class="f-s-14" target="_blank" href="<%=basePath%>${learnFile}">${learnFilesName[status.index]}</a>
                            </td>
                        </tr>
                    </c:forEach>
                </c:if>
            </table>
        </div>
    </div>
</div>